<template>
  <basic-container class="border-card">
    <div style="text-align: center">
      <el-radio-group v-model="tabPosition" style="margin-bottom: 30px;">
        <el-radio-button label="left">预约管理</el-radio-button>
        <el-radio-button label="right">预约挂号</el-radio-button>
      </el-radio-group>
    </div>
    <div style="height: 100%;" v-if="tabPosition==='left'">
      <pre-view @editRow="editRow"></pre-view>
    </div>
     <div v-else style="height: 100%;">
       <TakeOppointment @close="switchPage" :row.sync="row"></TakeOppointment>
     </div>
  </basic-container>

</template>

<script>
import PreView from './PreView.vue'
import TakeOppointment from './TakeOppointment.vue'
export default {
  name: 'home',
  components:{
    PreView,
    TakeOppointment
  },
  data () {
    return {
      tabPosition: 'left',
      row: {},
      activeIndex:'1'
    }
  },
  mounted(){
  },
  methods:{
    editRow(data){
      this.tabPosition = 'right'
      this.row = data
    },
    switchPage(value){
      switch (value) {
        case 1:

          break;
        case 2:
          break;
      }
    }
  }
}
</script>


<style scoped>
 .border-card{
   height: 100%;
   background: #ffffff;
}
</style>
